package icu.thatyear.main.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 商品
 * </p>
 *
 * @author Cjy
 * @since 2024-12-06
 */
@Getter
@Setter
@TableName("tz_prod")
@Schema(name = "TzProd", description = "商品")
public class TzProd implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "产品ID")
    @TableId(value = "prod_id", type = IdType.AUTO)
    private Long prodId;

    @Schema(description = "商品名称")
    @TableField("prod_name")
    private String prodName;

    @Schema(description = "店铺id")
    @TableField("shop_id")
    private Long shopId;

    @Schema(description = "原价")
    @TableField("ori_price")
    private BigDecimal oriPrice;

    @Schema(description = "现价")
    @TableField("price")
    private BigDecimal price;

    @Schema(description = "简要描述,卖点等")
    @TableField("brief")
    private String brief;

    @Schema(description = "详细描述")
    @TableField("content")
    private String content;

    @Schema(description = "商品主图")
    @TableField("pic")
    private String pic;

    @Schema(description = "商品图片，以,分割")
    @TableField("imgs")
    private String imgs;

    @Schema(description = "默认是1，表示正常状态, -1表示删除, 0下架")
    @TableField("status")
    private Integer status;

    @Schema(description = "商品分类")
    @TableField("category_id")
    private Long categoryId;

    @Schema(description = "销量")
    @TableField("sold_num")
    private Integer soldNum;

    @Schema(description = "总库存")
    @TableField("total_stocks")
    private Integer totalStocks;

    @Schema(description = "配送方式json见TransportModeVO")
    @TableField("delivery_mode")
    private String deliveryMode;

    @Schema(description = "运费模板id")
    @TableField("delivery_template_id")
    private Long deliveryTemplateId;

    @Schema(description = "录入时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @Schema(description = "上架时间")
    @TableField("putaway_time")
    private LocalDateTime putawayTime;

    @Schema(description = "版本 乐观锁")
    @TableField("version")
    private Integer version;
}
